package com.fc.advbox.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fc.advbox.utils.validator.group.AddGroup;
import com.fc.advbox.utils.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * CustomerContractEntity
 *
 * @author Gary.Jiang
 * @date 2018/6/22.15:40
 */

@Getter
@Setter
@JsonSerialize
@ApiModel(value = "CustomerContractEntity", description = "客户合同对象")
public class CustomerContractEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty(value = "user_id")
    @NotNull(message="客户ID不能为空",  groups = {AddGroup.class, UpdateGroup.class})
    private String userId;

    @ApiModelProperty(value = "name")
    @NotBlank(message="合同名不能为空",  groups = {AddGroup.class, UpdateGroup.class})
    private String name;

    @ApiModelProperty(value = "PROVINCE")
    @NotBlank(message="省份不能为空",  groups = {AddGroup.class, UpdateGroup.class})
    private String province;

    @ApiModelProperty(value = "CITY")
    @NotBlank(message="城市不能为空",  groups = {AddGroup.class, UpdateGroup.class})
    private String city;

    @ApiModelProperty(value = "AREA", allowEmptyValue = true)
    private String area;

    @ApiModelProperty(value = "CONTACTOR", allowEmptyValue = true)
    private String contactor; //联系人

    @ApiModelProperty(value = "CONTACT_PHONE", allowEmptyValue = true)
    private String contactPhone; //联系人电话

    @ApiModelProperty(value = "descn", allowEmptyValue = true)
    private String descn;

    @ApiModelProperty(value = "TYPE", allowEmptyValue = true)
    private String type;

    @ApiModelProperty(value = "EQUIPMENT_NUM", allowEmptyValue = true)
    private Integer equipmentNum;

    @ApiModelProperty(value = "amount", allowEmptyValue = true, notes = "投资金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "START_DATE", allowEmptyValue = true)
    private Date startDate;

    @ApiModelProperty(value = "END_DATE", allowEmptyValue = true)
    private Date endDate;

    private transient Integer interva;

}
